﻿/****************************************************************************
**  @copyright  TinKinG
**  @contract   lsnbing@126.com
**
**  @author TinKinG
**  @date   2020-3-12
**
**
*****************************************************************************/

#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>


QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class PerspectiveView;
class LineEdit;
class QVBoxLayout;

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();

    bool createDirByFullPath(const QString &fullPath);
    void save(const QImage &img, const QString &path, const QString &icnsName);

    void initOneRow();
    void initTwoRow();

public slots:
    void onSaveBtnClick();
    void onPngToIcnsClick();

    void onMerged();
private:
    QVBoxLayout *mainLayout = nullptr;
    Ui::Widget *ui;

    PerspectiveView *view = nullptr;

    // first row
    LineEdit *logoEdit = nullptr;
    LineEdit *nameEdit = nullptr;

    // second row
    LineEdit *pngEdit = nullptr;
    LineEdit *pngNewName = nullptr;
};
#endif // WIDGET_H
